home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / ARGO / WWW / WEBKIT_4.ARC / PD / !InterGif / !Help < prev    next >
Text File  |  1998-02-21  |  18KB  |  436 lines

  1.  
  2.                     InterGif 6.03
  3.                     =============
  4.  
  5.         by Peter Hartley (K) All Rites Reversed
  6.     Desktop front-end adapted from one by Iain Logan
  7.  
  8. INTERGIF 6.03 is a program for making GIF images from 2-, 4-, 16-
  9. or 256-colour RiscOS sprite files, or from Draw files, or from
  10. files produced with Iota Software's (commercial) animation
  11. program The Complete Animator. It can also convert from GIFs back
  12. to sprites, and can also be used as an optimiser for animated
  13. GIFs prepared in other programs.
  14.  
  15.  
  16.         Get the latest version
  17.         ----------------------
  18.  
  19. The latest version of InterGif, plus more help information and
  20. full source code for various platforms, is always available on
  21. the World-Wide Web at the address
  22.         http://www.ant.co.uk/~peter/software/intergif.htm
  23. It's the twentieth of February, 1998, as I'm writing these words:
  24. if it's long after that that you're reading them, you might want
  25. to see if there's a later version now available.
  26.  
  27.  
  28.         Distribution
  29.         ------------
  30.  
  31. InterGif is NOT COPYRIGHTED and is NOT distributed under the GNU
  32. General Public Licence. For full information read the file
  33. !InterGif.Copying or go to the Web site.
  34.     InterGif is mine: in particular, it doesn't belong to ANT
  35. Limited. If it gets anything wrong, it's my problem, not theirs.
  36.     Versions 6 and later of InterGif contain (a small piece of)
  37. code developed by the Independent JPEG Group. (The "Find best
  38. palette" routine, if you must know.)
  39.     In order to convert Draw files you will need Acorn's Drawfile
  40. module. This is not included in InterGif distributions, but is
  41. available from
  42.         ftp://ftp.acorn.co.uk/
  43.  
  44.  
  45.         Features
  46.         --------
  47.  
  48.   o InterGif runs either on the desktop, or from the command line
  49.     (so I can produce the GIFs for my own Web pages, from the
  50.     sprites which constitute their source, using a make file!).
  51.  
  52.   o InterGif has options for the transparency and interleaving
  53.     features of GIF89a.
  54.  
  55.   o InterGif can take a sprite file (or an Animator file)
  56.     containing several frames, and produce from it an animated
  57.     GIF which Netscape 2.0 or later, MSIE 3.0beta1 or later, or
  58.     ANT Fresco 1.22 or later will render as animated if it's
  59.     inlined in a Web page. The animation delay can be set
  60.     individually for each frame, or for the whole animation.
  61.  
  62.   o InterGif will reduce its input to a smaller number of colours
  63.     (unless you explicitly tell it not to) if it can get away
  64.     with it, i.e. if only that many of the colours are used
  65.     anyway.
  66.  
  67.   o It will also compress only the rectangle which has changed on
  68.     each frame, so if your animation has a complex but stationary
  69.     background, the background will only get compressed once.
  70.     Deviousness and cunning are employed to minimise the final
  71.     size of the GIF: so much so that many animated GIFs I've
  72.     found on the Web have ended up smaller when run through
  73.     InterGif.
  74.  
  75.   o It can also make GIF images from Draw files. It uses, for
  76.     this, the same code that is in my AADraw program (see end),
  77.     which means it produces GIFs or sprites with a 216-colour
  78.     cube palette (as used on Macintoshes and by Netscape and MSIE
  79.     for Windows), *not* the standard Acorn 256-colour palette.
  80.     (For AADraw connoisseurs, I'll add that you don't get the -b
  81.     feature of that program: InterGif always anti-aliases to
  82.     white.)
  83.  
  84.   o InterGif 6 lets you forcibly reduce a GIF's palette to the
  85.     standard Acorn 256-colour palette, or to a 216-entry colour
  86.     cube (as used on the Macintosh and by most Windows browsers),
  87.     or to a palette file you supply. Alternatively, it can
  88.     calculate the best palette for displaying the GIF, and then
  89.     reduce to that. (This is not the same as the colour reduction
  90.     InterGif has always had: it is lossy and you should keep
  91.     copies of your unmapped originals.)
  92.  
  93.   o InterGif 6.03 can pre-process each of your images using
  94.     Acorn's ChangeFSI: see below for more details.
  95.  
  96.  
  97.         Desktop use
  98.         -----------
  99.  
  100. Pretty straightforward. Run !InterGif; drag your sprite file,
  101. Animator file, Draw file, or GIF onto the left-hand bit of the
  102. window; set any options you want in the middle bit of the window;
  103. and save your GIF or sprite file out from the right-hand bit of
  104. the window. The options are:
  105.  
  106.   o Interlaced
  107.         Produce an interlaced GIF: in other words, one which a Web
  108.     browser can render quickly at a low resolution, filling in the
  109.     details later as they arrive.
  110.  
  111.   o Looping animation
  112.         Normally an animated GIF plays through once and stops. If
  113.     you tick this option, you'll get an animated GIF that plays
  114.     over and over again. This is a Netscape extension to the GIF
  115.     format, but hopefully it will become a popular one -- both
  116.     MSIE and Fresco now support it too.
  117.  
  118.   o Join input files
  119.         This option causes InterGif to look for only one frame in
  120.     the file you give it, and then look for the next frame in
  121.     another file with the numeric part of the file incremented.
  122.     For instance, you could have three files called frame000,
  123.     frame001, and frame002 and create an three-frame animation by
  124.     dragging frame000 (only) onto the InterGif window and
  125.     choosing "Join input files".
  126.  
  127.   o Set delay
  128.         This lets you set the frame rate, in centiseconds. This
  129.     overrides any frame rate specified in the input file.
  130.         If this is *not* ticked, InterGif's output uses the
  131.     same frame rate as its input. You can change frame delays
  132.     individually in Animator files in the usual way (in Animator,
  133.     press F7) or in sprite files by giving the frames sprite
  134.     names with "delay" in them: for instance, a sprite called
  135.     "037delay25" will be given a delay of 25 centiseconds.
  136.     (Anything before the word "delay" is ignored.)
  137.         If you leave "Set delay" unticked, and the input file
  138.     doesn't specify frame delays, a default of 8 centiseconds per
  139.     frame (12.5 frames per second) is used.
  140.         Note that you can't have different delays for different
  141.     frames if you tick "Set delay"; if you want that, you have to
  142.     set it up in your sprite or Animator file.
  143.  
  144.   o Transparency
  145.         Choose None to get a wholly opaque GIF (no masking), Auto
  146.     to get InterGif to use the sprites' masks (or the film's
  147.     background colour); or you can specify a transparent
  148.     pixel-value directly.
  149.         (Hint: to find out what pixel-value a sprite pixel has,
  150.     load the sprite into Paint, ensure its palette window is
  151.     showing, click Menu over the pixel you want, and choose
  152.     "Paint->Select colour".)
  153.  
  154.   o Trim
  155.         This option causes InterGif to remove wholly transparent
  156.     rows and columns from the edges of the image. This means that
  157.     the output image may be a different size from the input one,
  158.     which is otherwise never the case.
  159.         This option ticks itself automatically if you're making a
  160.     transparent, interlaced GIF: for the reason why, see the
  161.     section "Netscape Communicator" below.
  162.         You probably want to tick this if you're converting a
  163.     Draw file, as these often end up with one or two transparent
  164.     rows and columns at the edges.
  165.  
  166.   o Split output
  167.         This splits up the input file into one output file per
  168.     frame. Not, I admit, terribly useful, unless you need to
  169.     import something into an application that expects lots of
  170.     one-frame GIFs -- for instance, Sun's Java Animator applet.
  171.     The names of the files are taken from the one you give, with
  172.     any numeric part incremented as needed, so if you save a
  173.     three-frame animation as frame001/gif, you also get
  174.     frame002/gif and frame003/gif.
  175.  
  176.   o Web site
  177.         Clicking on this button takes you to my Web pages on ANT
  178.     Limited's server, as described above. For this to work, you
  179.     need to be connected to the Internet, and also have a Web
  180.     browser loaded which understands ANT's URL broadcast message
  181.     -- for example, Fresco or ArcWeb. (Probably the others too,
  182.     these days.)
  183.  
  184.   o Palette...
  185.         This icon opens the Palette Options window, giving you
  186.     the following further options:
  187.  
  188.       o Use existing
  189.             This does the same as previous versions of InterGif:
  190.         it discards palette entries that aren't actually used,
  191.         but keeps all the others.
  192.  
  193.       o Acorn standard 256
  194.       o 216 cube
  195.             These map all colours in the input onto the nearest
  196.         ones in either the standard Acorn 256-colour "mode 15"
  197.         palette, or the Macintosh/PC standard 216-entry colour
  198.         cube. This is useful, for instance, for reducing the size
  199.         of 256-greyscale images.
  200.  
  201.       o From file
  202.             You can also map colours to those in any Acorn
  203.         palette file (such as one saved from !Paint).
  204.  
  205.       o Find best
  206.             This is the most powerful option: selecting this
  207.         makes InterGif calculate the optimal palette for
  208.         displaying the input images, and then map to that. You
  209.         can tell it to calculate any size palette from 2 to 256
  210.         entries. InterGif uses the "median cut" algorithm to
  211.         calculate the palette.
  212.  
  213.   o ChangeFSI...
  214.         This icon opens the InterGif calling ChangeFSI window,
  215.     which gives you the option of pre-processing InterGif's input
  216.     file with Acorn's ChangeFSI image manipulation
  217.     program. This is mainly useful for importing files in formats
  218.     which InterGif doesn't understand directly: for instance, the
  219.     "Targa" files output by POV-Ray for Windows.
  220.         InterGif can give ChangeFSI any of a large range of
  221.     command-line options: most of the time you probably want this
  222.     set to just
  223.             28
  224.      -- which tells ChangeFSI to convert things to 256-colour
  225.     sprites. For details of the other options you can apply, see
  226.     the "FSIuse" text file inside the !ChangeFSI directory.
  227.         If the icons in this window are greyed out, this means
  228.     <ChangeFSI$Dir> isn't set: you should make sure !ChangeFSI
  229.     has been seen by the filer. If you don't have ChangeFSI at
  230.     all, or if you've got a version older than 1.12, you can get
  231.     1.12 from Acorn's FTP site at ftp://ftp.acorn.com/ .
  232.         There's a whole section on ChangeFSI later on in this
  233.     Help file.
  234.  
  235.  
  236.         Command-line use
  237.         ----------------
  238.  
  239. The !Boot file of !InterGif sets up Alias$intergif, so you no
  240. longer need to copy the intergif file into your library
  241. directory.
  242.     At its simplest, you can just type intergif and the name of
  243. your sprite or film file, and it'll be converted. Here's a full
  244. list of the options:
  245.  
  246. intergif [-i] [-loop] [-s ] [-split] [-d cs] [-t [pixel]] [-trim] [-join]
  247.          [-216 | -256 | -pal palfile | -best n ] [-c cfsi-options]
  248.          [-o outfile] infile
  249.  
  250.     -i
  251.         Produce an interlaced GIF
  252.     -loop
  253.         Looping animation
  254.     -s
  255.         Produce a sprite rather than a GIF
  256.     -join
  257.         Join several input files
  258.     -split
  259.         One frame per file
  260.     -d cs
  261.         Frame delay in centiseconds
  262.     -t
  263.         Use automatic transparency (default is no transparency)
  264.     -t pixel
  265.         Use specified pixel as transparent
  266.     -trim
  267.         Remove any transparent border
  268.     -216
  269.         Map to Macintosh/PC colour-cube palette
  270.     -256
  271.         Map to Acorn mode 15 palette
  272.     -pal palfile
  273.         Map to given palette
  274.     -best n
  275.         Find best n-colour palette and map to that (2<=n<=256)
  276.     -o outfile
  277.         Filename for the output (default is <infile>/gif)
  278.     -c cfsi-options
  279.         Preprocess using ChangeFSI with the given options (see below)
  280.     infile
  281.         A RiscOS sprite, Draw, Complete Animator or GIF file
  282.  
  283.  
  284.         Size is important
  285.         -----------------
  286.  
  287. Since at least version 2.02, InterGif has optimised out any
  288. wholly transparent rows and columns at the edges of the first (or
  289. only) frame of transparent GIFs. It does this by setting the size
  290. in the Logical Screen Descriptor to the size of the whole GIF,
  291. and the size in the first Frame Descriptor to the smaller
  292. rectangle which bounds the first frame. This is all completely as
  293. per GIF spec, and is what happens for the second and subsequent
  294. frames of animated GIFs anyway.
  295.     However, some programs which read GIFs (usually those which
  296. either don't understand animations, or don't understand
  297. transparency) incorrectly ignore the LSD size and use the FD
  298. size. These programs include ChangeFSI, Claris HomePage, and
  299. early versions of Fresco (before 1.60). This is a problem as it
  300. can lead to Web authors specifying the wrong WIDTH= and HEIGHT=
  301. attributes in Web pages. All versions of Netscape and MSIE use
  302. the LSD size (at least for GIF89's).
  303.     Early versions of the program "Creator" only set the FD size
  304. and not the LSD size; such images look wrong in MSIE. Netscape
  305. cheats! and uses only the FD size for GIF87 images and
  306. (correctly) the LSD size for GIF89 images. As of version 1.63,
  307. this is Fresco's behaviour too.
  308.  
  309.  
  310.         Netscape Communicator
  311.         ---------------------
  312.  
  313. Some interlaced transparent GIFs made with version 6.01 or
  314. earlier of InterGif may look wrong in Netscape Communicator
  315. (Netscape 4): any that do, should be reconverted with version
  316. 6.02. You may wish to use the new -trim option; if not, your GIF
  317. will be compressed slightly less well than it could be. This is
  318. due to a bug in Netscape 4, not in InterGif. For grody technical
  319. details, read on.
  320.     Netscape 4, in both the Windows and Solaris versions, gets it
  321. wrong if an interlaced image has a border optimised out on the
  322. first frame (in the manner described in "Size is important"
  323. above). The symptom is that black, non-transparent lines appear
  324. every fourth pixel down "transparent" areas of the image. This is
  325. *unquestionably* a bug in Communicator rather than InterGif
  326. (especially in view of the fact that Netscape 3.02 gets it
  327. right), but, powerless as I am in the face of Netscape
  328. Corporation, I've stopped InterGif from optimising out the border
  329. if an interlaced GIF is being made.
  330.     This means that such GIFs end up being compressed less
  331. optimally than they might. If this is a problem (and it may not
  332. be, as interlaced GIFs usually end up compressed less well than
  333. non-interlaced ones anyway) you can use the new -trim option to
  334. *remove*, rather than just avoid compressing, the transparent
  335. border. When using -trim, InterGif's output will *not* be the
  336. same size in pixels as the input image (it is in all other
  337. cases). You can use the HSPACE= and VSPACE= attributes of the
  338. HTML <IMG> tag to produce a transparent border around a trimmed
  339. image.
  340.  
  341.  
  342.         Using ChangeFSI with InterGif
  343.         -----------------------------
  344.  
  345. Some very powerful results are possible using this option. You
  346. need to read the help file "FSIuse" inside the !ChangeFSI
  347. directory, to know what to put in the InterGif's ChangeFSI
  348. Options icon (or pass with the -c command-line option).
  349.  
  350.   * Versions of ChangeFSI
  351.  
  352. There are several different versions of ChangeFSI circulating.
  353. The one available on Acorn's FTP site is, at time of writing,
  354. version 1.12, but there are later versions: I think these were
  355. distributed with RiscOS 3.6 and 3.7. The version I've got calls
  356. itself 1.13S, and I can't remember where I got it.
  357.     The only problem that older versions cause to InterGif, is
  358. that some early versions set ChangeFSI$Dir in their !Run files
  359. but not in their !Boot files, so InterGif won't know where to
  360. find the ChangeFSI program until ChangeFSI has already been run
  361. once. Version 1.12 fixes this.
  362.     In some versions of ChangeFSI, the FSIuse help file mentioned
  363. above is in !ChangeFSI.Documents rather than !ChangeFSI itself.
  364.  
  365.   * ChangeFSI only knows about single-frame files
  366.  
  367. This means that if you wish to run ChangeFSI on an animation file
  368. -- if, for instance, you've got an animated GIF you want to
  369. reduce in size -- you have to use InterGif twice.
  370.     The first time, you need to have the "Split output files" or
  371. -split option set: InterGif will produce a whole series of
  372. one-frame sprite files.
  373.     You then need to feed these sprite files back into InterGif,
  374. this time with Join input files or -join selected (plus your
  375. ChangeFSI options to reduce size or whatever): this will produce
  376. the reduced-size animation file you wanted.
  377.  
  378.   * ChangeFSI doesn't know about masking or transparency
  379.  
  380. ChangeFSI treats all input files as having a completely solid
  381. mask (no transparency). There isn't really a good workaround for
  382. this, as ChangeFSI can't know what background colour to fade
  383. "half-lit" edge pixels against.
  384.     All you can really do is edit your animation afterwards, in
  385. Paint or The Complete Animator, to re-supply the transparency by
  386. hand.
  387.  
  388.   * Example ChangeFSI settings
  389.  
  390. If all you're doing is using ChangeFSI to cope with an input
  391. format that InterGif doesn't understand itself, you just need to
  392. click on the ChangeFSI... button to open the "InterGif calling
  393. ChangeFSI" window, tick the tickbox, and enter
  394.         28
  395. in the Options icon. The "28" tells ChangeFSI to convert things
  396. to 256-colour sprites. The command-line equivalent would be
  397. something like
  398.         intergif in/bmp -o out/gif -c "28"
  399.  
  400. To reduce the input file to half-size, enter
  401.         28 1:2 1:2
  402. or use a command like
  403.         intergif in -o out -c "28 1:2 1:2"
  404.  
  405. If you've got a "deep" (16bpp or 24bpp) input image, you can use
  406. ChangeFSI to convert it to a deep sprite, and then tell InterGif
  407. to choose the optimal 256-colour palette, by entering
  408.         S32,90,90
  409. and then choosing Find best in the "InterGif palette options"
  410. window; or, from the command line,
  411.         intergif in -o out -c "S32,90,90" -best 256
  412. Older versions of ChangeFSI won't understand the S32,90,90 option
  413. though, and you may get an error.
  414.  
  415. My favourite one is converting a whole directory of output files
  416. from POV-Ray for Windows (in 24bpp Targa format) into a
  417. reduced-size animated GIF in one operation:
  418.         intergif frame000/tga -o anim/gif -join -c "28 1:3 1:3"
  419.  
  420.  
  421.         See also
  422.         --------
  423.  
  424.     The InterGif page
  425.         http://www.ant.co.uk/~peter/software/intergif.htm
  426.     The AADraw page
  427.         http://www.ant.co.uk/~peter/software/aadraw.htm
  428.     The Complete Animator
  429.         http://www.iota.co.uk/animator/
  430.     GIF89a specification
  431.         http://asterix.seas.upenn.edu/~mayer/lzw_gif/gif89a.html
  432.  
  433.  
  434.                                                   peter@ant.co.uk
  435.                                               20th February, 1998
  436.